<?php
namespace PsiFramework\Classes\Util\Database\Query;

/**
 * PsiFramework
 * Php Simple Framework
 *
 * @author Rémi San
 * @version beta
 */

/**
 * The SqlLimit class allows to represent a
 * limit for the sql query
 *
 * @package classes.util.xpersist.sql
 */
class SqlLimit
{

    protected /*int*/ $_skip ;
    protected /*int*/ $_length ;

    /**
     * SqlLimit constructor
     *
     * @param $skip        number of lines to skip
     * @param $length    the number of lines to retrieve
     */
    public function __construct(/*int*/ $length = null, /*int*/ $skip = 0)
    {
        $this->_length = $length ;
        $this->_skip = $skip ;
    }

    /**
     * Setter for the member variable $skip
     *
     * @param $skip
     */
    public function setSkip(/*int*/ $skip)
    {
        $this->_skip = $skip ;
    }

    /**
     * Setter for the member variable $length
     *
     * @param $length
     */
    public function setLength(/*int*/ $length)
    {
        $this->_length = $length ;
    }

    /**
     * Getter for the member variable $skip
     *
     * @return int
     */
    public function getSkip()
    {
        return $this->_skip ;
    }

    /**
     * Getter for the member variable $length
     *
     * @return int
     */
    public function getLength()
    {
        return $this->_length ;
    }

}

